<html>
<head>
	<?php // set the title depending on what dash you are viewing ?>
	<?php $title = "SEVA"; ?>
	<title><?php echo $title ?></title>
	
	<?php // Dynamically load CSS files that are only needed for this specific page. ?>
	<?php if (isset($head['css'])) foreach ($head['css'] as $css_page): ?>
		<link rel="stylesheet" type="text/css" href="<?php echo $css.$css_page ?>"/>
	<?php endforeach; ?>
	
	<?php // Copy the base URL and assets directories so they can be used in the javascript code. ?>
	<script type="text/javascript">
		var BASE = "<?php echo $base; ?>";
		var IMAGES = "<?php echo $images; ?>";
	</script>
	
	<?php // Dynamically load JS files that are only needed for this specific page. ?>
	<?php if (isset($head['js'])) foreach ($head['js'] as $js_page): ?>
		<script type="text/javascript" src="<?php echo $js.$js_page ?>"></script>
	<?php endforeach; ?>
	
	<link rel="stylesheet" type="text/css" href="<?php echo $css.'jquery-ui-1.10.1.custom.css' ?>"/>
	<?php /*left off, replacing these links with locally loaded files*/?>
	<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
	<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
	<!--<script href="<?php echo $js . 'jquery-ui-1.10.1.custom.min.js'?>"/></script>-->
</head>
<body>
	<a href="/"><img src="<?php echo $images.'SEVA.jpg'?>" height="120" width="120"></a>
	<?php if (isset($_SESSION['id'])) { ?>
	<div id="logout_div">
		<form action="<?php echo $base.'home/logout' ?>" method="post">
			<input type="submit" value="Log out"/>
		</form>
	</div>
	<?php } else { ?>
	<div id="login_div">
		<form action="<?php echo $base.'home/login' ?>" method="post">
			<label for="email">Email address:</label>
			<input id="email" name="email" type="text"/>
			<label for="password">Password:</label>
			<input id="password" name="password" type="password"/>
			<input type="submit" value="Log in"/>
			<a href="<?php echo $base.'home/forgot_password' ?>">Forgot your password?</a>
		</form>
	</div>
	<?php } ?>